<%@page import="org.springframework.security.core.context.SecurityContextHolder"%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="org.apache.commons.lang.time.DateFormatUtils"%>
<%@page import="org.springframework.util.CollectionUtils"%>
<%@page import="java.util.Collection"%>
<%@ include file="../common/common_include.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%

String userName = SecurityContextHolder.getContext().getAuthentication().getName();
String nowDate = DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss");
TblSiteJob job = (TblSiteJob)request.getAttribute("job");

%>


<div >
		<form id="jobFORM" name="form" target="coreIframe"
			action="<%=request.getContextPath()%>/site/doJobEdit" method="post" enctype="multipart/form-data">
			<div class="breadcrumb">
				<div class="bcIcon"></div>
				<ul class="bcNav">
					<li>编辑职位</li>
				</ul>
			</div>
			<%
				String jobId = EncrypTool.encode(job.getId().intValue());
			%>
<input type="hidden" name="id" value="<%=jobId %>">
			<table class="formTable">
				<tr>
					<td class="tdTitle">*职位：</td>
					<td><input class="inputText s" type="text" name="jobName" value="<%=job.getJobName() %>"
						 placeholder="" /><span class="errorTipWrap" id="errorTip_jobName"></span></td>
				</tr>
				<tr>
					<td class="tdTitle">*发布时间：</td>
					<td><input class="inputText xs" type="text" name="publicTime"
						 value="<%=nowDate%>"
						onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" /></td>
				</tr>
				<tr>
					<td class="tdTitle">*工作地点：</td>
					<td><input class="inputText xs" type="text" name="workAddress" placeholder="" value="<%=job.getWorkAddress() %>" />
					<span class="errorTipWrap" id="errorTip_workAddress">
					</td>
				</tr>
				<tr>
					<td class="tdTitle">*招聘人数：</td>
					<td><input class="inputText s" type="text" name="totalCount" value="<%=job.getTotalCount() %>"
						 placeholder="" /><span class="errorTipWrap" id="errorTip_totalCount"></span></td>
				</tr>
				<tr>
					<td class="tdTitle">工作年限：</td>
					<td><input class="inputText s" type="text" name="workAge" value="<%=StringUtils.isNotBlank(job.getWorkAge())?job.getWorkAge():"" %>"
						 placeholder="" /><span class="errorTipWrap" id="errorTip_workAge"></span></td>
				</tr>
				<tr>
					<td class="tdTitle">语言要求：</td>
					<td><input class="inputText s" type="text" name="workLanguage" value="<%=StringUtils.isNotBlank(job.getWorkLanguage())?job.getWorkLanguage():"" %>"
						 placeholder="" /><span class="errorTipWrap" id="errorTip_workLanguage"></span></td>
				</tr>
				<tr>
					<td class="tdTitle">学历：</td>
					<td><input class="inputText s" type="text" name="workEdu" value="<%= StringUtils.isNotBlank(job.getWorkEdu())?job.getWorkEdu():"" %>"
						 placeholder="" /><span class="errorTipWrap" id="errorTip_workEdu"></span></td>
				</tr>
				<tr>
					<td class="tdTitle">薪水范围：</td>
					<td><input class="inputText s" type="text" name="workPay" value="<%=StringUtils.isNotBlank(job.getWorkPay())?job.getWorkPay():""  %>"
						 placeholder="" /><span class="errorTipWrap" id="errorTip_workPay"></span></td>
				</tr>
				<tr>
					<td class="tdTitle">*薪酬福利：</td>
					<td><input class="inputText s" type="text" name="workWelfare" value="<%=job.getWorkWelfare() %>"
						 placeholder="" /><span class="errorTipWrap" id="errorTip_workWelfare"></span></td>
				</tr>
				<tr>
					<td class="tdTitle">上班地点：</td>
					<td><input class="inputText s" type="text" name="workPlace" value="<%=StringUtils.isNotBlank(job.getWorkPlace())?job.getWorkPlace():""%>"
						 placeholder="" /><span class="errorTipWrap" id="errorTip_workPlace"></span></td>
				</tr>
				<!--  
				<tr>
					<td class="tdTitle">职位职能：</td>
					<td><input class="inputText s" type="text" name="workFunction" value="<%=job.getWorkFunction() %>"
						 placeholder="" /><span class="errorTipWrap" id="errorTip_workFunction"></span></td>
				</tr>	
				-->																						
				<tr>
					<td class="tdTitle">*职位描述：</td>
					<td class="" colspan="2">
						<div style="padding-top: 10px; padding-bottom: 10px;">
							<textarea id="content" name="describe"
								style="width: 700px; height: 200px; visibility: hidden;"><%=job.getDescribe() %></textarea>
						</div>
						<span class="errorTipWrap" id="errorTip_describe"></span>
					</td>
				</tr>

				<tr>
					<td class="tdTitle"></td>
					<td>
						<div>
							<input class="input-btn-microsoft" type="submit" value="提交" id="click_btn">
							<a class="a-btn-microsoft"
								href="javascript:XF.Site.requestUrl('/site/jobList','jobList')">取消</a>
						</div>
					</td>
				</tr>
			</table>
		</form>
</div>
<iframe name="coreIframe" style="display: none"></iframe>
<script type="text/javascript">
	$(function() {
		XF.createKindEditor("content");
		$("input[name=jobName]").focus();
	}); 
</script>
</html>